<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<script type="text/javascript" src="../vue.js"></script>
		<title></title>
	</head>
	<body>
		<div id="app">		
			<comp></comp>
		</div>
		<script type="text/javascript">
			
			//注册局部组件
			var comp = {
				data: function () {
					return {
						count: 0,	
					}
				},
				template: '<button v-on:click="count++"> you click me {{count}} times </button>',
			}
			
			

			
			new Vue ({
				
				el: '#app',
				
				components:{
					comp, //属性的名即为组件名。可以简写comp
				}
				
			})
			
				
		</script>
		
	</body>
</html>
